import { createRouter,createWebHashHistory } from "vue-router";
import Home from'../views/Home.vue'
const base =import.meta.env.VTE_BASE_URL ||'/'
const router =createRouter({
    history:createWebHashHistory(),
    routes:[
        {
            path:'/',
            redirect:'/home'
        },
        {
            path:'/home',
            name:'Home',
            component:Home,
        },
        {
            path:'/live',
            name:'live',
            component:()=>import('../views/live.vue')
        },
        {
            path:'/shooping',
            name:'shooping',
            component:()=>import('../views/shopping.vue')
        },
        {
            path:'/my',
            name:'my',
            component:()=>import('../views/my.vue')
        },
        {
            path:'/search',
            name:'Search',
            redirect:{name:'index'},
            children: [{
                path: '/',
                name: 'index',
                component: () => import('../views/seach/Searchindex.vue'),
            },
            {
                path: 'list',
                name: 'list',
                component: () => import('../views/seach/SearchList.vue'),
            }
        ],
            component:()=>import('../views/Search.vue')
        },
        {
			path: '/sort',
			name: 'Sort',
			component: () => import('../views/Sort.vue'),
		},
        {
			path: '/detail',
			name: 'Detail',
			component: () => import('../views/Detail.vue'),
		},
        {
			path: '/login',
			name: 'Login',
			component: () => import('../views/login/Login.vue'),
		},
        {
			path: '/register',
			name: 'Register',
			component: () => import('../views/login/Register.vue'),
		},
        {
			path: '/modify',
			name: 'Modify',
			component: () => import('../views/login/Modify.vue'),
		},
        {
			path: '/order',
			name: 'Order',
			component: () => import('../views/Order.vue'),
		},
        {
			path: '/lyg',
			name: 'lyg',
			component: () => import('../views/lyg.vue'),
		},
    ]
})
export default router